<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{$memberDetail.nickname}的烘焙圈 - {$Config.sitename}</title>
    <link rel="stylesheet" href="__CSS__/global.css" />
    <link rel="stylesheet" href="__CSS__/huiyuan.css" />
    <Admintemplate file="Home/Public/global_js"/>
    <script src="__JS__/jquery.min.js"></script>
</head>

<body>

<div class="b-page">
    <include file="Public:header" />

    <!--<a href="{$midad.linkurl}" class="b-banner_big" style="background-image: url(__FILESURL__{$midad.image});">{$midad.title}</a>-->
    <div class="b-huiyuan">
        <div class="b-body l-center">
            <div class="b-huiyuan__top">
                <div class="b-userInfo l-mgb20">
                    <div class="b-userInfo__pic"><img src="{$memberDetail.uavatar|getUavatar}" class="l-full"></div>
                    <div class="b-userInfo__content">
                        <div class="b-userInfo__name">{$memberDetail.nickname}的烘焙圈
                            <if condition="$memberDetail.ifrz eq 1">
                            <a href="__WEBURL__/us/renzhen.html"><i class="b-renzhengIcon_big pic_mid"></i></a>
                            </if>
                        </div>
                        <div class="b-userInfo__ziliao">
                            <span>性别: {$memberDetail.usex|getUsex}</span>
                            <if condition="$memberDetail.uprovince neq ''">
                            <span><img src="__IMAGES__/icon_position.png" class="pic_mid">{$memberDetail.uprovince|showProvince},{$memberDetail.ucity|showCity}</span>
                            </if>
                            <span>{$memberDetail.create_time|date='Y-m-d',###} 加入</span>
                        </div>
                        <div class="b-userInfo__shejiao">
                            <a href="{$memberDetail.uweibo}" class="b-zuopinUser__shejiaoItem" style="margin-right:5px;">
                                <span>新浪微博</span>
                                <i class="b-shareIcon pic_mid"></i>
                            </a>
                            <a href="{$memberDetail.uqqzone}" class="b-zuopinUser__shejiaoItem">
                                <span>QQ空间</span>
                                <i class="b-qqzoneIcon pic_mid"></i>
                            </a>
                        </div>
                        <div class="b-userInfo__qianming">
                            <span class="jianduan act">{$memberDetail.usign|str_cut=60}</span>
                            <if condition="mb_strlen($memberDetail['usign'],'utf-8') gt 60">
                            <span class="quanbu">{$memberDetail.usign}</span>
                            <span rel="open" class="btn">(全部)</span>
                            </if>
                        </div>
                    </div>
                    <if condition="$userid neq $memberDetail['userid']">
                    <if condition="$isfans gt 0">
                        <a class="b-userInfo__guanzhu R_ajax_trip" data-info="userid,{$memberDetail.userid}" data-url="do/cancelfans/">取消关注</a>
                        <else/>
                        <a class="b-userInfo__guanzhu R_ajax_trip" data-info="userid,{$memberDetail.userid}" data-url="do/addfans/">关注</a>
                    </if>
                    </if>

                    <div class="b-userInfo__guanzhuInfo">
                        <div class="b-userInfo__guanzhuLeft">
                            <p class="b-userInfo__guanzhuP1">关注的人</p>
                            <p class="b-userInfo__guanzhuP2"><a href="__WEBURL__/u/{$memberDetail.openuid}/attention">{$memberDetail.attentionnum|getNullNum}</a></p>
                        </div>
                        <div class="b-userInfo__guanzhuRight">
                            <p class="b-userInfo__guanzhuP1">被关注</p>
                            <p class="b-userInfo__guanzhuP2"><a href="__WEBURL__/u/{$memberDetail.openuid}/fans">{$memberDetail.fansnum|getNullNum}</a></p>
                        </div>
                    </div>
                </div>
                <div class="b-userTab l-mgb20">
                    <a href="__WEBURL__/u/{$openuid}" class="b-userTab__item act"><p><span>概况</span></p></a>
                    <a href="__WEBURL__/u/{$openuid}/works" class="b-userTab__item"><p><span>烘焙作品</span></p></a>
                    <a href="__WEBURL__/u/{$openuid}/copy" class="b-userTab__item"><p><span>参考作品</span></p></a>
                    <a href="__WEBURL__/u/{$openuid}/suipai" class="b-userTab__item"><p><span>随拍作品</span></p></a>
                    <if condition="$memberDetail.userid eq $userid">
                    <a href="__WEBURL__/u/{$openuid}/favorite" class="b-userTab__item"><p><span>收藏</span></p></a>
					</if>
                    <a href="__WEBURL__/u/{$openuid}/message" class="b-userTab__item"><p><span>留言板</span></p></a>
                    
                </div>
            </div>
            <div class="b-huiyuan__body" <if condition="$suipai_count eq 0">style="display: none;"</if>>
                <div class="b-zuopinTtile l-mgb20">
                    <span>{$memberDetail.nickname}的随拍作品</span>
                    <a href="__WEBURL__/u/{$openuid}/suipai">（查看全部 {$suipai_count} 随拍作品）</a>
                </div>
                <div class="b-zuopinList">
                    <empty name="suipai_info"><div class="nodata">{$memberDetail.nickname}暂无随拍作品</div></empty>
                    <foreach name="suipai_info" item="sp">
                    <div class="b-zuopinItem <if condition="$key%3 eq 0">b-zuopinItem_first</if>">
                        <div class="b-zuopinItem__pic">
                            <img class="l-full" src="__FILESURL__{$sp.image}">
                        </div>
                        <div class="b-zuopinItem__title"><a href="__WEBURL__/suipai/{$sp.id}">{$sp.title|str_cut=20}</a></div>
                        <div class="b-zuopinItem__info">
                        	<span>{$sp.create_time|date='Y-m-d H:i',###}</span>
                            <span>|</span>
                            <span class="b-zuopinItem__zuoguo">{$sp.clicknum}浏览</span>
                            <span class="b-zuopinItem__shoucang">{$sp.msgnum|getNullNum}留言</span>
                        </div>
                    </div>

                    </foreach>
                </div>
                <div class="clear"></div>
            </div>
             <div class="b-huiyuan__body" <if condition="$works_count eq 0">style="display: none;"</if>>
                <div class="b-zuopinTtile l-mgb20">
                    <span>{$memberDetail.nickname}的烘焙食谱</span>
                    <a href="__WEBURL__/u/{$openuid}/works">（查看全部 {$works_count} 烘焙食谱）</a>
                </div>
                <div class="b-zuopinList">
                    <empty name="works_info"><div class="nodata">{$memberDetail.nickname}暂无烘焙食谱</div></empty>
                     <foreach name="works_info" item="wk">
                    <div class="b-zuopinItem <if condition="$key%3 eq 0">b-zuopinItem_first</if>">
                        <div class="b-zuopinItem__pic">
                            <img class="l-full" src="__FILESURL__{$wk.image}">
                            <div class="b-itemMask">
                                <if condition="$wk.dignum eq 0">
                                    <a class="b-itemMask__zan R_ajax_dig" data-info="infoid,{$wk.workid}~digtype,1" data-url="do/adddig/"><i class="b-popOtherZuopin__itemMask undig"></i></a>
                                    <else/>
                                    <a class="b-itemMask__zan R_ajax_dig" data-info="infoid,{$wk.workid}" data-url="do/canceldig/"><i class="b-popOtherZuopin__itemMask digged"></i></a>
                                </if>
                            </div>
                        </div>
                        <div class="b-zuopinItem__title"><a href="__WEBURL__/{$wk.type|getWorkUrl}/{$wk.workid}">{$wk.title}</a></div>
                        <div class="b-zuopinItem__info">
                        	<span>{$wk.create_time|date='Y-m-d H:i',###}</span>
                            <span>|</span>
                            <span class="b-zuopinItem__zuoguo">{$wk.copynum|getNullNum}做过</span>
                            <span class="b-zuopinItem__shoucang">{$wk.favoritenum|getNullNum}收藏</span>
                        </div>
                    </div>

                    </foreach>
                </div>
                <div class="clear"></div>
            </div>
            
            <div class="b-huiyuan__body" <if condition="$copy_count eq 0">style="display: none;"</if>>
                <div class="b-zuopinTtile l-mgb20">
                    <span>{$memberDetail.nickname}的参考作品</span>
                    <a href="__WEBURL__/u/{$openuid}/copy">（查看全部 {$copy_count} 参考作品）</a>
                </div>
                <div class="b-zuopinList">
                    <empty name="copy_info"><div class="nodata">{$memberDetail.nickname}暂无参考作品</div></empty>
                     <foreach name="copy_info" item="cp">
                    <div class="b-zuopinItem <if condition="$key%3 eq 0">b-zuopinItem_first</if>">
                        <div class="b-zuopinItem__pic">
                            <img class="l-full" src="__FILESURL__{$cp.image}">
                            <div class="b-itemMask">
                                <if condition="$cp.dignum eq 0">
                                    <a class="b-itemMask__zan R_ajax_dig" data-info="infoid,{$cp.workid}~digtype,1" data-url="do/adddig/"><i class="b-popOtherZuopin__itemMask undig"></i></a>
                                    <else/>
                                    <a class="b-itemMask__zan R_ajax_dig" data-info="infoid,{$cp.workid}" data-url="do/canceldig/"><i class="b-popOtherZuopin__itemMask digged"></i></a>
                                </if>
                            </div>
                        </div>
                        <div class="b-zuopinItem__title"><a href="__WEBURL__/copy/{$cp.workid}">{$cp.title}</a></div>
                        <div class="b-zuopinItem__info">
                        	<span>{$cp.create_time|date='Y-m-d H:i',###}</span>
                            <span style="display:none;">|</span>
                            <span class="b-zuopinItem__zuoguo" style="display:none;">{$cp.copynum|getNullNum}做过</span>
                            <span class="b-zuopinItem__shoucang" style="display:none;">{$cp.favoritenum|getNullNum}收藏</span>
                        </div>
                    </div>

                    </foreach>
                </div>
                <div class="clear"></div>
            </div>
            
            <div class="b-huiyuan__bottom">

            </div>
        </div>
    </div>

    <include file="Public:footer" />

</div>

<script src="__JS__/index.js"></script>
<script src="__JS__/jquery.common.js?v=20150101"></script>
<script src="__JS__/jquery.doajax.js"></script>
<script>
    $(document).ready(function(){
      /*  $('.b-zuopinItem').each(function(i,val){
            if(i%3==0) $(this).addClass('b-zuopinItem_first');
        });*/
        $('.b-zuopinItem__pic').hover(function(){
            $(this).find('.b-itemMask').stop(true,true).fadeIn();
        },function(){
            $(this).find('.b-itemMask').stop(true,true).fadeOut();
        });
        $('.b-userInfo__qianming .btn').on('click',function(){
            var type=$(this).attr('rel');
            switch(type){
                case 'open':{
                    $('.b-userInfo__qianming .jianduan').removeClass('act');
                    $('.b-userInfo__qianming .quanbu').addClass('act');
                    $(this).attr('rel','close').html('(收起)');
                    break;
                }
                case 'close':{
                    $('.b-userInfo__qianming .jianduan').addClass('act');
                    $('.b-userInfo__qianming .quanbu').removeClass('act');
                    $(this).attr('rel','open').html('(全部)');
                    break;
                }
            }
        });

        $(".b-zuopinItem__pic img").each(function(i){
            var img = $(this);
            var realWidth;//真实的宽度
            var realHeight;//真实的高度
            //这里做下说明，$("<img/>")这里是创建一个临时的img标签，类似js创建一个new Image()对象！
            $("<img/>").attr("src", $(img).attr("src")).load(function() {
                realWidth = this.width;
                realHeight = this.height;
                if(realHeight>400){
                    var margintop=(realHeight/2-200)/2;
                    img.css('marginTop','-'+margintop+'px');
                }
            });
        });

    });
</script>

</body>
</html>